define(["../logic/statistics", "../common/common"],
    function (pluginClass, c) {
        return {
            pluginClass: pluginClass,
            style: {
                backgroundColor: 'rgb(245, 245, 245)'
            },
            nocache: true,
            root: ["mainvlayout"],
            components: {
                mainvlayout:{
                    type:"vbox",
                    style:{
                        height:"100%"
                    },
                    items:[{
                        style:{
                            height:"57px",
                            paddingTop:"10px",
                            backgroundColor:"#fff",
                            borderBottom:"1px solid rgb(238, 238, 238)"
                        },
                        root:["temp_dropdown_btn","depart_dropdown_btn","team_dropdown_btn","type_btn","excel_btn_wrap"]
                    },
                    {
                        style:{
                            backgroundColor:"#fff",
                            marginTop:"10px"
                        },
                        root:["time_switch_wrapper","list_table_warp"]
                    }]
                },

                excel_dropdown: {
                    type: "dropdown",
                    ref: true,
                    style: {
                        position: "absolute",
                        top: 6,
                        left: 0,
                        visibility: "hidden"
                    },
                    offset:{
                        x:-50
                    },
                    dropDownStyle: {
                        width: 160
                    },
                    title: "-",
                    displayMember: "name"
                },
                excel_btn_wrap:{
                    type:"view",
                    root:["excel_btn","excel_dropdown"],
                    style:{
                        float:"right",
                    }
                },
                excel_btn:{
                  type:"button",
                  title:"导出",
                  style:{
                    display:"inline-block",
                    verticalAlign:"middle",
                    color:"#ffffff",
                    backgroundColor:"#1FDA9A",
                    borderColor:"#1FDA9A",
                    marginRight:"20px",
                    width:110,
                    height:33
                  }

                },
                time_switch_wrapper:{
                  type:"view",
                  root:["time_switch"],
                  style:{
                    paddingTop:"23px",
                    width:"100%"
                  }
                },
                time_switch:{
                  type:"hbox",
                  items:[
                    {
                      root:["time_switch_lefticon"],
                      style:{
                        width:"30px",
                        verticalAlign:"middle"
                      }
                    },
                    {
                      root:["time_switch_value"],
                      style:{
                        verticalAlign:"middle",
                        textAlign:"center"
                      }
                    },
                    {
                      root:["time_switch_righticon"],
                      style:{
                        width:"30px",
                        verticalAlign:"middle"
                      }
                    }
                  ],
                  style:{
                    height:"38px",
                    width:"182px",
                    lineHeight:"35px",
                    color: "#333",
                    margin:"auto",
                    backgroundColor:'#fff',
                    borderRadius:"20px",
                    //boxShadow: '0 10px 12px 0px rgba(0, 227, 142, 0.15)'
                  }//
                },
                time_switch_lefticon:{
                  type:"icon",
                  font:"FontAwesome_f0d9",
                  style:{
                    margin:"auto"
                  },
                  iconStyle:{
                    color:"rgb(31, 218, 154)",
                    cursor:"pointer"
                  }
                },
                time_switch_value:{
                  type:"text",
                  text:"0000年00月",
                  style:{
                    fontSize:"18px",
                    color:"rgb(31, 218, 154)",
                  }
                },
                time_switch_righticon:{
                  type:"icon",
                  className:"time-switch-righticon",
                  font:"FontAwesome_f0da",
                  style:{
                    margin:"auto"
                  },
                  iconStyle:{
                    color:"rgb(31, 218, 154)",
                    cursor:"pointer"
                  }
              },


                type_btn: {
                    type: "view",
                    className: "dc-condition-dropdown",
                    style: {
                        height: "33px",
                        lineHeight: "25px",
                        paddingLeft: 10,
                        marginLeft: "10px",
                        display: "inline-block",
                        verticalAlign: "middle",
                        paddingRight: 10,
                        border: "1px solid #eee",
                        borderRadius: "4px"
                    },
                    root: ["type_btn_icon", "type_btn_dp_icon", "type_btn_dropdown"]
                },
                type_btn_dropdown: {
                    type: "dropdown",
                    ref: true,
                    style: {
                        position: "absolute",
                        top: 6,
                        left: 0,
                        visibility: "hidden"
                    },
                    dropDownStyle: {
                        width: 200
                    },
                    title: "-",
                    displayMember: "name"
                },

                type_btn_icon: {
                    type: "icon",
                    text: "按月统计",
                    ref: true,
                    iconStyle:{
                        color: "#aaaaaa",
                        fontSize:"17px"
                    },
                    style: {
                        color: "#666",
                        verticalAlign: "middle",
                        display: "inline-block"
                    },
                    textStyle: {
                        fontSize: "13px",
                        marginLeft: 9
                    }
                },
                type_btn_dp_icon: {
                    type: "icon",
                    font: "FontAwesome_f107",
                    iconStyle:{
                        color: "#aaaaaa",
                        fontSize:15
                    },
                    style: {
                        color: "#666",
                        marginLeft: 4,
                        verticalAlign: "middle",
                        display: "inline-block"
                    }
                },

                depart_dropdown_btn: {
                    type: "view",
                    className: "dc-condition-dropdown",
                    style: {
                        height: "33px",
                        lineHeight: "25px",
                        paddingLeft: 10,
                        marginLeft: "10px",
                        display: "inline-block",
                        verticalAlign: "middle",
                        paddingRight: 10,
                        border: "1px solid #eee",
                        borderRadius: "4px"
                    },
                    root: ["depart_dropdown_icon", "depart_dropdown_dp_icon", "depart_dropdown"]
                },
                depart_dropdown: {
                    type: "dropdown",
                    ref: true,
                    style: {
                        position: "absolute",
                        top: 6,
                        left: 0,
                        visibility: "hidden"
                    },
                    dropDownStyle: {
                        width: 200
                    },
                    delayLoadData: true,
                    title: "-",
                    displayMember: "deptName"
                },

                depart_dropdown_icon: {
                    type: "icon",
                    text: "全部部门",
                    ref: true,
                    iconStyle:{
                        color: "#aaaaaa",
                        fontSize:"17px"
                    },
                    style: {
                        color: "#666",
                        verticalAlign: "middle",
                        display: "inline-block"
                    },
                    textStyle: {
                        fontSize: "13px",
                        marginLeft: 9
                    }
                },
                depart_dropdown_dp_icon: {
                    type: "icon",
                    font: "FontAwesome_f107",
                    iconStyle:{
                        color: "#aaaaaa",
                        fontSize:15
                    },
                    style: {
                        color: "#666",
                        marginLeft: 4,
                        verticalAlign: "middle",
                        display: "inline-block"
                    }
                },


                team_dropdown_btn: {
                    type: "view",
                    className: "dc-condition-dropdown",
                    style: {
                        height: "33px",
                        lineHeight: "25px",
                        paddingLeft: 10,
                        marginLeft: "10px",
                        display: "inline-block",
                        verticalAlign: "middle",
                        paddingRight: 10,
                        border: "1px solid #eee",
                        borderRadius: "4px"
                    },
                    root: ["team_dropdown_icon", "team_dropdown_dp_icon", "team_dropdown"]
                },
                team_dropdown: {
                    type: "dropdown",
                    ref: true,
                    style: {
                        position: "absolute",
                        top: 6,
                        left: 0,
                        visibility: "hidden"
                    },
                    dropDownStyle: {
                        width: 200
                    },
                    delayLoadData: true,
                    title: "-",
                    displayMember: "groupName"
                },

                team_dropdown_icon: {
                    type: "icon",
                    text: "全部团队",
                    ref: true,
                    iconStyle:{
                        color: "#aaaaaa",
                        fontSize:"17px"
                    },
                    style: {
                        color: "#666",
                        verticalAlign: "middle",
                        display: "inline-block"
                    },
                    textStyle: {
                        fontSize: "13px",
                        marginLeft: 9
                    }
                },
                team_dropdown_dp_icon: {
                    type: "icon",
                    font: "FontAwesome_f107",
                    iconStyle:{
                        color: "#aaaaaa",
                        fontSize:15
                    },
                    style: {
                        color: "#666",
                        marginLeft: 4,
                        verticalAlign: "middle",
                        display: "inline-block"
                    }
                },

                temp_dropdown_btn: {
                    type: "view",
                    className: "dc-condition-dropdown",
                    style: {
                        height: "33px",
                        lineHeight: "25px",
                        paddingLeft: 10,
                        marginLeft: "10px",
                        display: "inline-block",
                        verticalAlign: "middle",
                        paddingRight: 10,
                        border: "1px solid #eee",
                        borderRadius: "4px"
                    },
                    root: ["temp_dropdown_icon", "temp_dropdown_dp_icon", "temp_dropdown"]
                },
                temp_dropdown: {
                    type: "dropdown",
                    ref: true,
                    style: {
                        position: "absolute",
                        top: 6,
                        left: 0,
                        visibility: "hidden"
                    },
                    dropDownStyle: {
                        width: 200
                    },
                    delayLoadData: true,
                    title: "-",
                    displayMember: "title"
                },
                temp_dropdown_icon: {
                    type: "icon",
                    ref: true,
                    text: "全部模板",
                    style: {
                        color: "#666",
                        verticalAlign: "middle",
                        display: "inline-block"
                    },
                    iconStyle:{
                        color:"#aaaaaa",
                        fontSize:15
                    },
                    textStyle: {
                        fontSize: "13px",
                        marginLeft: 5
                    }
                },
                temp_dropdown_dp_icon: {
                    type: "icon",
                    font: "FontAwesome_f107",
                    style: {
                        color: "#aaa",
                        marginLeft: 4,
                        fontSize:15,
                        verticalAlign: "middle",
                        display: "inline-block"
                    }
                },

                nodata:{
                    type:"text",
                    text:"没有相关数据",
                    style:{
                        color:"gray",
                        marginTop:"20px",
                        fontSize:"15px",
                        textAlign:"center"
                    }
                },
                list_table_warp:{
                    type:"view",
                    style:{
                        backgroundColor:"#fff",
                        paddingLeft:"20px",
                        paddingRight:"20px"
                    },
                    root:["list_table"]
                },
                list_table:{
                  type:"table",
                  className:"statistics_table",
                  nodata:"nodata",
                  ref:true,
                  style:{
                    margin:"auto",
                    marginTop:"20px",
                    fontSize:"12px"
                  },
                  ajaxConfig:{
                    url: "/diaryQuery/getStatisticsByCondition",
                    type: "GET",
                    pageNumKey:"pageNo",
                    pageSize:31,
                    timeout:999999999,
                    data:{
                      pageNo:1,
                      pageSize:31
                    }
                  },
                  headerStyle:{
                    backgroundColor:"#F2F3F4",
                    fontSize:"12px",
                    height:"32px",
                    color:"#999",
                    textAlign:"center",
                  },
                  rowStyle:{
                    borderBottom:"1px solid #F2F3F4",
                    cursor:"pointer",
                    height: "60px"
                  },
                  columns:[




                  ]
                }


            }
        };
    });
